package snooker.scoreboard;

import android.content.res.Resources;
import android.graphics.Color;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class FaultCheckBox {

	private boolean checked = false;
	private TextView faultTextV;
	
	public FaultCheckBox(Resources r, TextView faultTextV) {
		this.faultTextV = faultTextV;
	}
	
	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
		if (checked) {
			faultTextV.setBackgroundColor(Color.BLUE);
		} else {
			faultTextV.setBackgroundColor(Color.BLACK);
		}
	}
	
	public void setOnClickListener(OnClickListener ocl) {
		faultTextV.setOnClickListener(ocl);
	}
}
